﻿using SqlSugar;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace ProductionManagement.Domain.Dtos
{
    public class MaterialUpdDto
    {
        public int MaterialId { get; set; }
        /// <summary>
        /// 编码
        /// </summary>
        public int MaterialNode { get; set; }
        /// <summary>
        /// 物料清单主题
        /// </summary>
        [SugarColumn(ColumnDataType = "Nvarchar(50)")]//设计长度
        public string? MSubject { get; set; }
        /// <summary>
        /// 物料清单编号
        /// </summary>
        [SugarColumn(ColumnDataType = "Nvarchar(50)")]//设计长度
        public string? MNumber { get; set; }
        /// <summary>
        /// 制表人员
        /// </summary>
        [SugarColumn(ColumnDataType = "Nvarchar(50)")]//设计长度
        public string? MWatchmakers { get; set; }
        /// <summary>
        /// 备注
        /// </summary>
        [SugarColumn(ColumnDataType = "Nvarchar(200)")]//设计长度
        public string? MRemark { get; set; }
        /// <summary>
        /// 产品名称
        /// </summary>
        [SugarColumn(ColumnDataType = "Nvarchar(50)")]//设计长度
        public string? MPName { get; set; }
        /// <summary>
        /// 产品编码
        /// </summary>
        [SugarColumn(ColumnDataType = "Nvarchar(50)")]//设计长度
        public string? MPNumber { get; set; }

        /// <summary>
        /// 规格型号
        /// </summary>
        [SugarColumn(ColumnDataType = "Nvarchar(50)")]//设计长度
        public string? MPSpec { get; set; }
        /// <summary>
        /// 单位
        /// </summary>
        [SugarColumn(ColumnDataType = "Nvarchar(50)")]//设计长度
        public string? MPUnit { get; set; }
        /// <summary>
        /// 数量
        /// </summary>
        public int? MQuantity { get; set; }
        /// <summary>
        /// 产品角色
        /// </summary>
        public int? MProductPersonas { get; set; }
        /// <summary>
        /// 工艺流程
        /// </summary>
        public string? MProcess { get; set; }
        /// <summary>
        /// 耗损率
        /// </summary>
        public decimal? MWearRate { get; set; }


        /// <summary>
        /// 添加人姓名
        /// </summary>
        public string? AddName { get; set; }

        /// <summary>
        /// 添加时间
        /// </summary>
        public DateTime? AddTime { get; set; }
        /// <summary>
        /// 修改姓名
        /// </summary>
        public string? UpdName { get; set; }

        /// <summary>
        /// 修改时间
        /// </summary>
        public DateTime? UpdTime { get; set; }
        /// <summary>
        /// 公司id
        /// </summary>
        public string? Office_Id { get; set; }

        /// <summary>
        /// 用户id
        /// </summary>
        public int? User_Id { get; set; }

        public List<ItemSubpiecea> ItemSubpiecesList { get; set; }

    }

    public class ItemSubpiecea
    {
        /// <summary>
        /// 物料子件ID
        /// </summary>
        public int itemSubpieceId { get; set; }
        /// <summary>
        /// 产品id
        /// </summary>
        public int? ProductId { get; set; }
        /// <summary>
        /// 数量
        /// </summary>
        public int INumber { get; set; }
        /// <summary>
        /// 产品角色
        /// </summary>
        public int IProductPersonas { get; set; }
        public string PNumber { get; set; }
        public string? PName { get; set; }
        public string? PSpec { get; set; }
        public string? PUnit { get; set; }
        public string? ProductRatio { get; set; }
        /// <summary>
        /// 工艺流程
        /// </summary>
        public string? IProcess { get; set; }
        /// <summary>
        /// 耗损率
        /// </summary>
        public decimal IWearRate { get; set; }
        /// <summary>
        /// 领料方式
        /// </summary>
        [SugarColumn(ColumnDataType = "Nvarchar(50)")]
        public string? IPickingMethod { get; set; }
        /// <summary>
        /// 编码
        /// </summary>
        public int? MaterialNode { get; set; }

        /// <summary>
        /// 备注
        /// </summary>
        public string? IMRemark { get; set; }

        /// <summary>
        /// 添加人姓名
        /// </summary>
        public string? AddName { get; set; }

        /// <summary>
        /// 添加时间
        /// </summary>
        public DateTime? AddTime { get; set; }=DateTime.Now;
        /// <summary>
        /// 修改姓名
        /// </summary>
        public string? UpdName { get; set; }

        /// <summary>
        /// 修改时间
        /// </summary>
        public DateTime? UpdTime { get; set; }
        /// <summary>
        /// 公司id
        /// </summary>
        public string? Office_Id { get; set; }

        /// <summary>
        /// 用户id
        /// </summary>
        public int? User_Id { get; set; }


    }


}
